var net = require("./net")


net.reload({
	db: "192.168.82.99:8899"
})

net.dispatch(function (address, session, msg) {
	console.log("------->", address, session, msg)

	if (session > 0) {
		net.ret(session, true, {code: true, name: "张三", num: "11122229999999111", num2: 89999.4, list: [12, 3, "nice"]})
	}
})




net.call("db", "tamplate", {say: "hello lua", cmd: "one"}, (session, msg)=> {
	console.log("1----------> call response:", session, msg)
})

net.call("db", "tamplate", {say: "hello lua", cmd: "two"}, (session, msg)=> {
	console.log("2----------> 2 call response:", msg)
})

net.listen("0.0.0.0", 8822)



